#pragma once

#include "Glad/glad/glad.h"
#include <functional>

#include "Component\Physics\Transform.h"
#include "Glad/GLFW/glfw3.h"

namespace SakuraAge {
class Input {
 private:
  
 public:
  
  static void _mouseButtonCallback(GLFWwindow* window, int button, int action,
                                   int mods);
  static void _mousePositionCallback(GLFWwindow* window, double xpos,
                                     double ypos);
  static void _keyButtonCallback(GLFWwindow* window, int key, int scancode,
                                 int action, int mods);
 
  enum class ButtonState { Press = GLFW_PRESS, Release = GLFW_RELEASE , Repeat = GLFW_REPEAT, Away};
  static bool LeftKey, RightKey, Wheel;

  static std::map<int, std::function<void(Input::ButtonState)>> keyCallBacks;

 private:
  static GLFWwindow* _window;
  static Vector2 _mousePosition;

 public:
  static void _SetWindow(GLFWwindow* window) { Input::_window = window; }
  static Vector2 GetMousePosition();
  static void BindKeyEvent(int key, std::function<void(class BunttonState)> func) {}
};
}  // namespace SakuraAge
